package xyz.csmcool.imutil.utils;

import xyz.csmcool.imutil.webVo.ResultCode;
import xyz.csmcool.imutil.webVo.ResultVo;

/**
 * @author 什锦
 * @Package xyz.csmcool.utils
 * @since 2021/7/31 18:57
 */

public class ResultTool {
    public static ResultVo success() {
        return new ResultVo(true);
    }

    public static <T> ResultVo<T> success(T data) {
        return new ResultVo(true, data);
    }

    public static ResultVo fail() {
        return new ResultVo(false);
    }

    public static ResultVo fail(ResultCode resultEnum) {
        return new ResultVo(false, resultEnum);
    }
}
